package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.BooleanValueExpression;
import com.yanmaohu.yulia.bean.ConstraintCharacteristics;
import com.yanmaohu.yulia.bean.SchemaElement;
import com.yanmaohu.yulia.bean.SchemaQualifiedName;

/**
 * @author Bright Lee
 */
public final class AssertionDefinition implements SchemaElement, SqlSchemaDefinitionStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private SchemaQualifiedName constraintName;
    private BooleanValueExpression searchCondition;
    private ConstraintCharacteristics constraintCharacteristics;

    public AssertionDefinition(int beginIndex,
                               int endIndex,
                               SchemaQualifiedName constraintName,
                               BooleanValueExpression searchCondition,
                               ConstraintCharacteristics constraintCharacteristics) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.constraintName = constraintName;
        this.searchCondition = searchCondition;
        this.constraintCharacteristics = constraintCharacteristics;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SchemaQualifiedName getConstraintName() {
        return constraintName;
    }

    public BooleanValueExpression getSearchCondition() {
        return searchCondition;
    }

    public ConstraintCharacteristics getConstraintCharacteristics() {
        return constraintCharacteristics;
    }

}
